<template>
  <div class="shujixq">
    <div class="booktop">
      <div class="top">
        <div class="top1">
          <div class="imgs" @click="toshuj()">
            <img src="../../assets/images/logon.png" alt="" />
          </div>
          <div class="lefts">
            <div></div>
            <div class="lefts1">浙江省非物质文化<br />数字文献中心</div>
            <div class="lefts2">
              ZhejiangProvinceIntangibleCultureDigitalLiteratureCenter
            </div>
          </div>
          <div class="rights">
            <div></div>
            <usertbtn></usertbtn>
            <div class="ris3">
              <el-form :inline="true" :model="formInline" class="demo-form-inline"
                style="width: 100%; display: flex; height: 56px">
                <el-form-item style="width: 382px; height: 56px; margin-bottom: 0">
                  <el-input v-model="formInline.user" placeholder="输入关键词搜索" style="width: 382px; height: 56px">
                    <img slot="append" src="../../assets/images/sousuo.png" alt="" />
                  </el-input>
                  <!-- <el-input placeholder="输入关键词搜索" v-model="formInline.user" class="input-with-select">
                        <el-button slot="append" icon="el-icon-search" @click="sousuos()"></el-button>
                        </el-input> -->
                </el-form-item>
                <el-form-item>
                  <div style="padding-left: 20px; margin-top: 7px; cursor: pointer" @click="onSubmit()">
                    <div style="
                        display: flex;
                        align-items: center;
                        height: 100%;
                        font-size: 18px;
                        font-family: Source Han Sans CN-Regular,
                          Source Han Sans CN;
                        font-weight: 400;
                        color: #911f23;
                      ">
                      高级检索
                      <i style="font-size: 18px; font-weight: 550" class="el-icon-arrow-right"></i>
                    </div>
                  </div>
                </el-form-item>
              </el-form>
            </div>
          </div>
        </div>
      </div>
    </div>


    <div class="booktop1">
      <div class="book1">
        <div class="wj">
          <span>论文名称：</span>
          {{ pcxqlist.ktmc }}
        </div>
        <div class="wj1">
          <div class="wj12">
            <span>级 别：</span>
            {{ pcxqlist.ktjbname }}
          </div>
          <div class="wj12">
            <span>发表时间：</span>
            {{ pcxqlist.ktjtsj }}
          </div>
        </div>
        <div class="wj1">
          <div class="wj12">
            <span>负责人：</span>
            {{ pcxqlist.ktfzr }}
          </div>
          <div class="wj12">
            <span>是否获奖：</span>
            {{ pcxqlist.ktsfhj }}
          </div>
        </div>

        <div class="wj1">
          <div class="wj12">
            <span>相关传承人：</span>
            {{ pcxqlist.ktxgccr }}
          </div>
          <div class="wj12">
            <span>相关项目：</span>
            {{ pcxqlist.ktxgxm }}
          </div>
        </div>
        <div class="wj2">

          <div class="wj12">
            <span>课题组成员：</span>
            {{ pcxqlist.ktzyry }}
          </div>
          <div class="wj12">
            <span>课题单位：</span>
            {{ pcxqlist.ktdw }}
          </div>
        </div>

        <div class="wj" style="padding-top:16px">
          <span>课题成果：</span>
          <span v-html="pcxqlist.ktcg" style="font-size:14px"></span>
        </div>

      </div>
      <div class="neirong">
        {{ pcxqlist.ktmc }}
      </div>
      <div class="neirong1">
      </div>

      <div class="book2">
        <div class="book21">
          <div class="book22" v-html="pcxqlist.ktyjly">

          </div>
        </div>
      </div>
      <!-- <div class="neirong1">
        </div> -->
      <div class="gdxx" v-if="gdxx">
        <div class="title">归档信息</div>
        <div class="inheritor inheritor_gdxx">
          <div class="basic_information">
            <div class="basic_information_item">
              <span>索引号:</span>
              <div>{{ gdxx.syh }}</div>
            </div>
            <div class="basic_information_item">
              <span>条码号:</span>
              <div>{{ gdxx.tmh }}</div>
            </div>
            <div class="basic_information_item">
              <span>馆藏状态:</span>
              <div>{{ gdxx.zt == 1 ? '出借' : '在馆' }}</div>
            </div>
            <div class="basic_information_item">
              <span>应还时间:</span>
              <div>{{ gdxx.yhsj | dataFormat }}</div>
            </div>
            <div class="basic_information_item">
              <span>排架号:</span>
              <div>{{ gdxx.pjh }}</div>
            </div>
            <div class="basic_information_item">
              <span>文献所属馆:</span>
              <div>{{ gdxx.ssg }}</div>
            </div>
            <div class="basic_information_item">
              <span>所在馆:</span>
              <div>{{ gdxx.szg }}</div>
            </div>
            <div class="basic_information_item">
              <span>所在馆位置:</span>
              <div>{{ gdxx.szgwz }}</div>
            </div>
            <div class="basic_information_item">
              <span>卷册信息:</span>
              <div>{{ gdxx.jcxx }}</div>
            </div>
            <div class="basic_information_item">
              <span>备注:</span>
              <div>{{ gdxx.bz }}</div>
            </div>
          </div>
        </div>
      </div>

    </div>
    <div style="width:100%;height:100px;background-color: #fff;"></div>
    <footbtn class="foot"></footbtn>
  </div>
</template>
<style scoped  lang="scss">
::v-deep .el-input {
  display: flex;
  justify-content: center;
  color: #333333;
}

::v-deep .el-input--prefix .el-input__inner {
  width: 305px;
  border: 0px;
}

//搜索框
::v-deep .el-input-group>.el-input__inner {
  height: 56px;
  border: 0px;
}

::v-deep .el-input-group__append {
  border: none !important;
  background-color: #fff;
  padding: 0 45px 0 10px;
}

::v-deep .el-input-group__append img {
  width: 32px;
  height: 32px;
  padding-top: 12px;
  cursor: pointer;
}

::v-deep .el-button--primary {
  background-color: #911f23;
  border-color: #911f23;
  border-radius: 8px;
  height: 56px;
  width: 112px;
  margin-left: 16px;
}

::v-deep .el-form--inline .el-form-item {
  margin-right: 0;
}

.shujixq {
  width: 100%;
  background-color: #f7f7f8;

  .booktop {
    width: 100%;
    height: 200px;
    background: url("../../assets/images/booktop.png") no-repeat;
    background-size: 100% 100%;

    .top {
      width: 1400px;
      height: 176px;
      margin: 0 auto;

      // background-color: #F7F7F8;
      .top1 {
        position: relative;
        width: calc(100% - 0px);
        margin: 0 auto;
        height: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;

        // background-color: pink;
        .imgs {
          position: absolute;
          top: 0;
          width: 138px;
          height: 176px;
          z-index: 100;

          img {
            width: 100%;
            height: 100%;
          }
        }

        .lefts {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          height: 100%;
          margin-left: 170px;

          .lefts1 {
            font-size: 24px;
            font-family: Source Han Sans CN-Regular, Source Han Sans CN;
            font-weight: 400;
            color: #333333;
            // line-height: 35px;
          }

          .lefts2 {
            font-size: 14px;
            font-family: Source Han Sans CN-Regular, Source Han Sans CN;
            font-weight: 400;
            color: #666666;
          }
        }

        .rights {
          position: relative;
          display: flex;
          flex-direction: column;
          align-items: flex-end;
          justify-content: space-between;
          // padding-bottom: 40px;
          height: 100%;

          .ris3 {
            // width: 362px;
            // margin-top: 37px;
          }

          .ri {
            padding-right: 30px;
          }

          .ri1 {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 68px;
            height: 38px;
            background: #911f23;
            border-radius: 8px 8px 8px 8px;
            opacity: 1;
            color: #fff;
            cursor: pointer;
          }
        }
      }
    }
  }

  .booktop1 {
    width: 100%;
    background-color: #fff;
    padding: 32px 0;

    .book1 {
      width: calc(1200px - 48px);
      margin: 0px auto;
      border-radius: 8px 8px 8px 8px;
      opacity: 1;
      padding: 20px;
      border: 1px solid #d8d8d8;

      .wj {
        width: 100%;
        font-size: 14px;
        color: #666;

        span {
          font-size: 16px;
          color: #333333;
        }
      }

      .wj1 {
        width: 100%;
        padding-top: 16px;
        display: flex;

        .wj12 {
          width: 50%;
          font-size: 14px;
          color: #666;

          span {
            font-size: 16px;
            color: #333333;
          }
        }
      }

      .wj2 {
        width: 100%;
        padding-top: 16px;
        display: flex;

        .wj12 {
          width: 50%;
          font-size: 13px;
          color: #666;

          span {
            font-size: 15px;
            color: #333333;
          }
        }
      }

    }

    .neirong {
      width: 500px;
      margin: 0 auto;
      text-align: center;
      margin-top: 40px;
      font-size: 20px;
      color: #333333;
      font-weight: 600;
      line-height: 36px;
    }

    .neirong1 {
      width: 1200px;
      margin: 20px auto;
      height: 1px;
      background-color: #d0d0d3;

    }

    .neirong2 {
      width: 1200px;
      margin: 0px auto;
      display: flex;
      justify-content: space-around;
      font-size: 14px;
      color: #666;

      span {
        font-size: 14px;
        font-weight: 550;
        color: #333333;

      }

    }

    .book2 {
      width: calc(1400px - 0px);
      margin: 0px auto;
      border-radius: 8px 8px 8px 8px;
      opacity: 1;
      margin-top: 50px;
      background-color: #fff;
      border-radius: 8px;

      .book21 {
        width: 1200px;
        margin: 0 auto;

        .title {
          width: 100%;
          display: flex;
          align-items: center;

          .xian {
            width: 12px;
            height: 24px;
            background: #911f23;
            border-radius: 0px 0px 0px 0px;
            opacity: 1;
          }

          .wenzi {
            margin-left: 12px;
            font-size: 22px;
            font-family: Source Han Sans CN-Medium, Source Han Sans CN;
            font-weight: 500;
            color: #3d3d3d;
          }
        }

        .book22 {
          width: 100%;
          padding-top: 16px;
          font-size: 14px;
          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
          font-weight: 400;
          color: #666666;
          line-height: 22px;
        }
      }
    }

    .gdxx {
      width: 1200px;
      margin: 0 auto;
      margin-top: 30px;

      .title {
        font-size: 20px;
        color: #333333;
        font-weight: 600;
        text-align: center;
      }

      .inheritor_gdxx {
        .basic_information {
          display: flex;
          flex-wrap: wrap;
          border: 1px solid #d8d8d8;
          border-left: 0;
          border-right: 0;
          margin: 24px 0 16px;
          padding: 20px 24px 5px;

          .basic_information_item {
            display: flex;
            width: calc(33.3% - 20px);

            margin-bottom: 22px;

            span {
              padding-right: 20px;
              font-size: 14px;
              font-weight: 400;
              color: #911f23;
              display: block;
              // margin-bottom: 4px;
            }

            div {
              font-size: 14px;
              font-weight: 400;
              color: #3d3d3d;
            }
          }
        }
      }
    }
  }
}

.foot {
  position: fixed;
  bottom: 0;
  left: 0;
}
</style>

<script>
import { getBookXq, getlilunxq, getwxgdxx } from "@/api/api.js";
import usertbtn from "../../components/user/index.vue";
import footbtn from "../../components/foot/index.vue";
export default {
  data() {
    return {
      shujixq: {},

      formLogin: {
        name: "",
        // padd: "",
      },
      formInline: {
        user: "",
      },
      mc: "",
      id: 0,
      lx: 0,
      pcxqlist: {},
      gdxx: {},
    };
  },
  created() {
    this.id = this.$route.query.id
    this.lx = this.$route.query.lx
    this.mc = sessionStorage.getItem("sousuo");

    this.bookxq();
    this.getwxgdxx()
  },
  mounted() {
    // this.creatQrCode();
  },
  methods: {
    async getwxgdxx() {
      let res = await getwxgdxx({
        id: this.lx,
        lx: this.id
      })
      console.log('归档信息==', res);
      if (res.code == 200) {
        this.gdxx = res.data[0]
        console.log('this.gdxx', this.gdxx);
      }
    },
    xzfj(url) {
      window.open(url, '_blank');
    },
    toshuj() {
      sessionStorage.setItem("erjsnav", 4);
      sessionStorage.setItem("sousuo", this.mc);
      this.$router.push({
        path: "/s7",
        query: {},
      });
    },

    async bookxq() {
      let res = await getlilunxq({
        id: this.lx * 1,
        type: this.id * 1
      });

      this.pcxqlist = res;
      //   this.fujianLists =  res.fujianList?res.fujianList:[]


    },
    sousuos() {
      if (this.formInline.user == "") {
        this.$message.error({ message: "请输入搜索内容!", center: true });
      }
    },
    onSubmit() {
      // sessionStorage.setItem("erjsnav", 4);
      sessionStorage.setItem("erjsnav", 0);
      this.$router.push({
        path: "/retrieval",
        query: {},
      });
    },
  },
  computed: {},
  components: {
    footbtn,
    usertbtn,
  },
};
</script>
